//package PeterSheep.Utils;
//
//import PeterSheep.Kernel;
//
//import javax.sql.rowset.CachedRowSet;
//import javax.sql.rowset.RowSetFactory;
//import javax.sql.rowset.RowSetProvider;
//import java.sql.Connection;
//import java.sql.DriverManager;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//
//public class UnitTest {
//    public static void main(String[] args) throws SQLException {
//        CachedRowSet crs = f();
//        int uc = 0;
//        while(crs.next()) {
//            uc++;
//            System.out.println(" User "+uc+" is: "+crs.getString("username"));
//        }
//
//    }
//
//    private static CachedRowSet f() throws SQLException {
//        String url = String.format("//%s:%s/%s?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC",
//                "localhost", "3306", "PeterSheep");
//        Connection databaseConnection = DriverManager.getConnection("jdbc:mysql:" + url, "root", "");
//        ResultSet rs = databaseConnection.createStatement().executeQuery("SELECT * FROM accounts");
//        RowSetFactory rsf = RowSetProvider.newFactory();
//        CachedRowSet sss = rsf.createCachedRowSet(); sss.populate(rs);
//        databaseConnection.close();
//        return sss;
//    }
//}
